#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>

#include <linux/getprocinfo.h>
#include <sys/time.h>

#include "print_task.h"

#define getprocinfo(arg1, arg2) syscall(300, arg1, arg2)

int main( int argc, char ** argv ) {

  if ( argc < 2 ) {
    printf("Usage: %s <pid>\n", argv[0]);
    return -1;
  }
  int pid = atoi( argv[1] );

 
  struct proc_info_struct s;

  getprocinfo( pid, &s );

  print_task(&s);

  return 0;


}
